from libs.db import DB


def get_pay_dict(cursor):
    db = DB('table_pay', conn=cursor)
    rows = db.find(['pay_mode', 'pay_name'])
    pay_dict = {}
    for row in rows:
        pay_dict.update({row.get('pay_mode'): row.get('pay_name')})
    return pay_dict
